<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>


<script>
function countFund(idStart, countStr, totalStr) {

	var indexs = countStr.split(",");
	var count = 0;
	for ( var i = 0; i < indexs.length; i++) {
		var fund = $("#" + idStart + indexs[i]).val();
		if (!$.isNumeric(fund))
			fund = "0";
		count = ((parseFloat(count)*10000 + parseFloat(fund)*10000)/10000).toFixed(4);
	}

	count = formatNumber(count.toString(), 7, 0, 0);// 格式化金额
	$("#" + idStart + totalStr).val(count);
}

function selectFirstRadio(obj) {
	$(obj).parent('td').parent('tr').find('input[type="radio"]').attr("checked","checked");
	setSubmitPsn();
}







function psnSynchro(){
	$("span[name$='fzr_psnname']").text($("#zh_persons tr:eq(2)").find("span[name$='basic_info/zh_name']").text());
	$("span[name$='fzr_tel']").text($("#zh_persons tr:eq(2)").find("input[name$='contact/tel_work']").val());
	$("span[name$='fzr_mobile']").text($("#zh_persons tr:eq(2)").find("input[name$='contact/mobile']").val());
	$("span[name$='fzr_mail']").text($("#zh_persons tr:eq(2)").find("input[name$='contact/email']").val());
}


</script>





<table class="t_css" width="100%" border="0" cellpadding="0" id="basicInfo6"
	cellspacing="1">
	<col style="width:14.3%"/>
  <col style="width:14.3%"/>
  <col style="width:14.3%"/>
  <col style="width:14.3%"/>
  <col style="width:14.3%"/>
  <col style="width:14.3%"/>
  <col style="width:14.3%"/>
 
	<div class="t_bar"><span style="color:red;">*</span>课题组人员信息</div>
  <tr>
    <td align="center">总人数</td>
    <td align="center">高级</td>
    <td align="center">中级</td>
    <td align="center">初级</td>
    <td align="center">博士后</td>
    <td align="center">博士生</td>
    <td align="center">硕士生</td>
  </tr>
   <tr>
   <td align="center">
   <input id="psncnt_total" name="zh_persons/psncnt_total" label="总人数" type="text" label="课题组人员信息-->项目人员总人数"
				class="required gray" disabled="disabled"  style="width:80%;text-align:right;" maxlength="50" onfocus="InitInput.setNumber(this,7,0,0)"
				  value="<x:out select="$xmlData/data/zh_persons/psncnt_total" />"/>
				  
				  
	</td>
	 
   
    <td align="center"><input id="psncnt_high" name="zh_persons/psncnt_high" label="课题组人员信息-->高级" type="text" 
				class="input_css required maxlength:50"  style="width:80%;text-align:right;" maxlength="50" onfocus="InitInput.setNumber(this,7,0,0)"
				value="<x:out select="$xmlData/data/zh_persons/psncnt_high" />"
				onchange="countNum('','psncnt_low,psncnt_mid,psncnt_high,postdoctor,doctor,master','psncnt_total');"  />
	 </td>
	 
	 <td align="center"><input id="psncnt_mid" name="zh_persons/psncnt_mid" label="课题组人员信息-->中级" type="text" 
				class="input_css required maxlength:50"  style="width:80%;text-align:right;" maxlength="50" onfocus="InitInput.setNumber(this,7,0,0)"
				value="<x:out select="$xmlData/data/zh_persons/psncnt_mid" />"
				onchange="countNum('','psncnt_low,psncnt_mid,psncnt_high,postdoctor,doctor,master','psncnt_total');" />
	 </td>
	 
	 <td align="center"><input id="psncnt_low" name="zh_persons/psncnt_low" label="课题组人员信息-->初级" type="text" 
				class="input_css required maxlength:50"  style="width:80%;text-align:right;" maxlength="50" onfocus="InitInput.setNumber(this,7,0,0)"
				value="<x:out select="$xmlData/data/zh_persons/psncnt_low" />" 
				onchange="countNum('','psncnt_low,psncnt_mid,psncnt_high,postdoctor,doctor,master','psncnt_total');"/>
	 </td>
	 
	 <td align="center"><input id="postdoctor" name="zh_persons/postdoctor" label="课题组人员信息-->博士后" type="text" 
				class="input_css required maxlength:50"  style="width:80%;text-align:right;" maxlength="50" onfocus="InitInput.setNumber(this,7,0,0)"
				value="<x:out select="$xmlData/data/zh_persons/postdoctor" />" 
				onchange="countNum('','psncnt_low,psncnt_mid,psncnt_high,postdoctor,doctor,master','psncnt_total');" />
	 </td>
	 
	 
	 
	 <td align="center"><input id="doctor" name="zh_persons/doctor" label="课题组人员信息-->博士生" type="text" 
				class="input_css required maxlength:50"  style="width:80%;text-align:right;" maxlength="50" onfocus="InitInput.setNumber(this,7,0,0)"
				value="<x:out select="$xmlData/data/zh_persons/doctor" />"
				onchange="countNum('','psncnt_low,psncnt_mid,psncnt_high,postdoctor,doctor,master','psncnt_total');" />
	 </td>
	 
	 
	 <td align="center"><input id="master" name="zh_persons/master" label="课题组人员信息-->硕士生" type="text" 
				class="input_css required maxlength:50"  style="width:80%;text-align:right;" maxlength="50" onfocus="InitInput.setNumber(this,7,0,0)"
				value="<x:out select="$xmlData/data/zh_persons/master" />" 
				onchange="countNum('','psncnt_low,psncnt_mid,psncnt_high,postdoctor,doctor,master','psncnt_total');"/>
	 </td>
	 
   </tr>
</table>




<div class="t_bar">
	<span class="color_red">*</span>课题组主要研究人员（限10人）
	<security:authorize ifNotGranted="A_DAILU_PROPOSAL">
	<!-- <span style="font-size: 12px;font-weight: normal;">
		（如果您需要修改申请人信息， 请保存申请书后点击菜单“管理”>“个人信息维护”完成修改）
	</span> -->
	</security:authorize>
</div>
	<table  id="zh_persons" border="0" cellspacing="0" cellpadding="0" class="table01" >
		<thead>
			<tr>
        <th width="5%" >选择</th>
        <th width="5%">序号</th>
				<th width="10%">姓名</th>
				<th width="11%">从事专业</th>
				<th width="10%">出生年月</th>
				<th width="10%">职务/职称</th>
				<th width="10%">学位</th>
				<th width="10%">项目分工</th>
				<th width="20%">所在单位</th>
				<th width="9%">每年工作时间（月）</th>
			</tr>
		</thead>
		<tbody id="tab">
			<tr style="display: none">
				<td  align="center"  width="50px" >
					<input type="radio" name="sel_zh_persons" onclick="setSubmitPsn()" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|ethnicity_value" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|ethnicity_name" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|subject_code" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|subject_name" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|discipline_code" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|discipline_name" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|region_value" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|region_name" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|card_type_value" />
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|academician_value" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|academician_name" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|org_code" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|contact|tel_work" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|contact|fax" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|post_code" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|degree_value" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|degree_country_value" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|degree_country_name" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|degree_college" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|degree_year" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|address" />
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|prof_title" />
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|prof_title_value" />
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|post_doctor_value"/>
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|post_doctor_name"/>
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|birth_date"/>
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|gender_value"/>
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|age"/>
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|educate_value"/>
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|educate_name" /> 
					<input type="hidden" name="zh_persons|zh_person[0]|iscomember" value="0"/>
					<input type="hidden" name="zh_persons|zh_person[0]|researches" label="xml"/>
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|card_type_name" />
					<input type="hidden" name="zh_persons|zh_person[0]|basic_info|card_code"/>
					<input type="hidden" name="zh_persons|zh_person[0]|contact|email"/>
					<input type="hidden" name="zh_persons|zh_person[0]|contact|mobile"/>
				<input type="hidden" name="zh_persons|zh_person[0]|basic_info|work_time_value"/> 
					<!-- <input type="hidden" name="zh_persons|zh_person[0]|basic_info|work_time_name"/> -->
				
				</td>
				<td align="center">
					<span name="zh_persons|zh_person[0]@seq_no">[index]</span>
				</td>
				<td align="center">
					<span name="zh_persons|zh_person[0]|basic_info|zh_name"></span>
				</td>
				<td align="center">
					<span name="zh_persons|zh_person[0]|contact|major_work"></span>
				</td>
				<td align="center">
					<span name="zh_persons|zh_person[0]|basic_info|birthday"></span>
				</td>
				<td align="center">
					<span name="zh_persons|zh_person[0]|basic_info|position"></span>/<span name="zh_persons|zh_person[0]|basic_info|prof_title_name"></span>
				</td>
				<td align="center">
					<span name="zh_persons|zh_person[0]|basic_info|degree_name"></span>
				</td>
				<td align="center">
					<span name="zh_persons|zh_person[0]|basic_info|work" ></span>
				</td>
				<td align="center">
					<span  name="zh_persons|zh_person[0]|basic_info|org_name" ></span>
				</td>
				<td align="center">
					<span  name="zh_persons|zh_person[0]|basic_info|work_time_name" ></span>
				</td>
				
				
				
			</tr>
			<c:set value="0" var="index" scope="page" />
			<x:forEach select="$xmlData/data/zh_persons/zh_person" var="zh_person">
				<c:choose>
					<c:when test="${index<10}">
						<c:set value="0" var="flag" scope="page" />
					</c:when>
					<c:otherwise>
						<c:set value="" var="flag" scope="page" />
					</c:otherwise>
				</c:choose>
				<tr>
					<td  align="center"  width="50px" >
						<input type="radio" name="sel_zh_persons" onclick="setSubmitPsn()" /> <!-- 选择 -->
						<c:if test="${index==0}">
							<input type="hidden" id="submit_psn" name="zh_persons/zh_person[${flag}${index}]@submit_psn" value="1" />
							<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/psn_code" value="<x:out select="$zh_person/basic_info/psn_code" />"/>
						</c:if>
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/ethnicity_value" value="<x:out select="$zh_person/basic_info/ethnicity_value" />"/><!-- 民族   下拉框 -->
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/ethnicity_name" value="<x:out select="$zh_person/basic_info/ethnicity_name" />"/>
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/subject_code" value="<x:out select="$zh_person/basic_info/subject_code" />"/><!-- 国家科技部学科领域 树形图 -->
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/subject_name" value="<x:out select="$zh_person/basic_info/subject_name" />"/>
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/discipline_code" value="<x:out select="$zh_person/basic_info/discipline_code" />"/><!-- 国家基金委学科领域  树形图-->
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/discipline_name" value="<x:out select="$zh_person/basic_info/discipline_name" />"/>
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/region_value" value="<x:out select="$zh_person/basic_info/region_value" />" /><!-- 国别或地区  下拉框-->
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/region_name" value="<x:out select="$zh_person/basic_info/region_name" />" />
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/gender_value" value="<x:out select="$zh_person/basic_info/gender_value" />" /><!-- 性别 单选框 -->
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/card_type_value" value="<x:out select="$zh_person/basic_info/card_type_value" />" /><!-- 证件类型 下拉框-->
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/card_type_name" value="<x:out select="$zh_person/basic_info/card_type_name" />"/>
						
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/academician_value" value="<x:out select="$zh_person/basic_info/academician_value" />" /><!-- 院士 下拉框 -->
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/academician_name" value="<x:out select="$zh_person/basic_info/academician_name" />" />
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/org_code" value="<x:out select="$zh_person/basic_info/org_code" />" />
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/contact/tel_work" value="<x:out select="$zh_person/contact/tel_work" />" /><!-- 工作电话  输入框-->
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/contact/fax" value="<x:out select="$zh_person/contact/fax" />" />
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/degree_value" value="<x:out select="$zh_person/basic_info/degree_value" />" /><!-- 最高学位  下拉框-->
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/post_code" value="<x:out select="$zh_person/basic_info/post_code" />" />
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/degree_country_value" value="<x:out select="$zh_person/basic_info/degree_country_value" />" /> <!-- 授予国别或地区 下拉框 -->
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/degree_country_name" value="<x:out select="$zh_person/basic_info/degree_country_name" />" /> 
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/degree_college" value="<x:out select="$zh_person/basic_info/degree_college" />" /> <!-- 授予学校 输入框 -->
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/degree_year" value="<x:out select="$zh_person/basic_info/degree_year" />" /> <!-- 授予年份 输入框 -->
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/prof_title" value="<x:out select="$zh_person/basic_info/prof_title" />" /> <!-- 职称  树形图 -->
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/prof_title_value" value="<x:out select="$zh_person/basic_info/prof_title_value" />" /> 
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/address" value="<x:out select="$zh_person/basic_info/address" />"/>
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/post_doctor_value" value="<x:out select="$zh_person/basic_info/post_doctor_value" />"/><!-- 博士后  下拉框 -->
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/post_doctor_name" value="<x:out select="$zh_person/basic_info/post_doctor_name" />"/>
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/age" value="<x:out select="$zh_person/basic_info/age" />"/>
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/educate_value" value="<x:out select="$zh_person/basic_info/educate_value" />"/><!-- 最高学历  下拉框 -->
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/educate_name" value="<x:out select="$zh_person/basic_info/educate_name" />" />
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/card_code" value="<x:out select="$zh_person/basic_info/card_code" />"/><!-- 证件号码  输入框 -->

						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/contact/email" value="<x:out select="$zh_person/contact/email" />"/><!-- 电子邮件 输入框 -->
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/contact/mobile" value="<x:out select="$zh_person/contact/mobile" />"/><!-- 手机 输入框 -->
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/iscomember" value="0"/>
						
						<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/researches" label="xml"/>
						
			      <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/work_time_value" class="required" label="每年工作时间"  value="<x:out select="$zh_person/basic_info/work_time_value" />"/> 
					<%-- 	<input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/work_time_name" value="<x:out select="$zh_person/basic_info/work_time_name" />"/> --%>
						
						
					</td>
					<td align="center">
					<span name="zh_persons/zh_person[${flag}${index}]@seq_no">${index+1}</span>
					</td>
					<td align="center">
						<span name="zh_persons/zh_person[${flag}${index}]/basic_info/zh_name"><x:out select="$zh_person/basic_info/zh_name" /></span>
						<security:authorize ifAnyGranted="A_DAILU_PROPOSAL">
						<c:if test="${index==0 }"><a href="###" class="Blue" style="text-decoration: none;" onclick="selectFirstRadio(this);editRow('zh_persons','${ctx}/proposal/edit/dialog/psnInfoEdit_zrkxjj?parentTab=zh_persons&type=edit&needMeetingInfo=${param.needMeetingInfo}&psnCode=<x:out select="$zh_person/basic_info/psn_code" />&TB_iframe=true&height=440&width=900','编辑项目参与人信息')">[&nbsp;设置&nbsp;]</a></c:if>
						</security:authorize>
					</td>
					<td align="center">
						<span name="zh_persons/zh_person[${flag}${index}]/contact/major_work"><x:out select="$zh_person/contact/major_work" /></span>
					</td>
					<td align="center">
						<span name="zh_persons/zh_person[${flag}${index}]/basic_info/birthday"><x:out select="$zh_person/basic_info/birthday" /></span>
					</td>
					<td align="center">
						<span name="zh_persons/zh_person[${flag}${index}]/basic_info/position"><x:out select="$zh_person/basic_info/position" /></span>/<span name="zh_persons/zh_person[${flag}${index}]/basic_info/prof_title_name"><x:out select="$zh_person/basic_info/prof_title_name" /></span>
					</td>
					<td align="center"> 
						<span name="zh_persons/zh_person[${flag}${index}]/basic_info/degree_name"><x:out select="$zh_person/basic_info/degree_name" /></span>
					</td>
					<td align="center">
						<span name="zh_persons/zh_person[${flag}${index}]/basic_info/work"><c:choose><c:when test="${index==0}">项目负责人</c:when><c:otherwise><x:out select="$zh_person/basic_info/work" /></c:otherwise></c:choose></span>
					</td>
					<td align="center">
						<span name="zh_persons/zh_person[${flag}${index}]/basic_info/org_name"><x:out select="$zh_person/basic_info/org_name" /></span>
					</td>
					
					
					<td align="center">
						<span name="zh_persons/zh_person[${flag}${index}]/basic_info/work_time_name"><x:out select="$zh_person/basic_info/work_time_name" /></span>
					</td>
					
					
					
				</tr>
				<c:set value="${index+1}" var="index" scope="page" />
			</x:forEach>
			</tbody>
	</table>
	<table border="0" cellpadding="0" cellspacing="1">
		<tr>
			<td>
				<input class="button_02" type="button" value="添加" onclick="if(checkTabLimit('zh_persons',10,'课题组主要研究人员最多只能填写10条')){addNewRow('zh_persons','${ctx}/proposal/edit/dialog/psnInfoEdit_zrkxjj?parentTab=zh_persons&type=add&needMeetingInfo=${param.needMeetingInfo}&TB_iframe=true&height=440&width=900','添加项目参与人');}try{top.resizeFrame();}catch(e){};">
				&nbsp;<input class="button_02"  id="zh_psnPrev" type="button" value="上移" onclick="movePrev('zh_persons');setSubmitPsn()">
				&nbsp;<input class="button_02"  id="zh_psnNext" type="button" value="下移" onclick="moveNext('zh_persons');setSubmitPsn()">
				&nbsp;<input class="button_02"  id="zh_psnEdit" type="button" value="编辑" onclick="editRow('zh_persons','${ctx}/proposal/edit/dialog/psnInfoEdit_zrkxjj?parentTab=zh_persons&type=edit&needMeetingInfo=${param.needMeetingInfo}&TB_iframe=true&height=440&width=900','编辑项目参与人信息')">
				&nbsp;<input class="button_02"  id="zh_psnDel" type="button" value="删除" onclick="deleteSelectedRow('zh_persons','课题组主要研究人员',1,'申请人不能被删除');"></td>
		</tr>
	</table>
	  <br/>
	 